package com.financing.wap.dao.impl;
 



import java.sql.SQLException;
import java.util.List;

import org.springframework.stereotype.Repository;

import com.financing.wap.common.SqlName;
import com.financing.wap.dao.IActivitesDao;
import com.financing.wap.dto.ActivitesDTO;
import com.financing.wap.dto.ActivitesExpandDTO;



@Repository("activitesDao")
public class ActivitesDaoImpl extends BaseDaoImpl<ActivitesDTO, java.lang.Integer> implements IActivitesDao {


	@Override
	public Class<ActivitesDTO> getEntityClass() {
	 
		return ActivitesDTO.class;
	}

	@SuppressWarnings("deprecation")
	@Override
	public ActivitesDTO searchActivitesByCode(String activitesCode) {
		ActivitesDTO result = (ActivitesDTO)this.getSqlMapClientTemplate().queryForObject(SqlName.ACTIVITES_SEARCH_BY_CODE,activitesCode);
		return result;
	}

	@SuppressWarnings("deprecation")
	@Override
	public int updateActivitesByCode(ActivitesDTO dto) {
		return this.sqlMapClientTemplate.update(SqlName.ACTIVITES_UPDATE_AMOUNT_BY_CODE, dto);
	}
 
	@SuppressWarnings({ "unchecked", "deprecation" })
	@Override
	public List<ActivitesExpandDTO> searchActivitesExpand(ActivitesExpandDTO bean) throws SQLException {
		return this.sqlMapClientTemplate.queryForList(SqlName.ACTIVITES_SEARCH_EXPAND,bean);
	}
}
